import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from '@/store/index'
import vuescroll from 'vuescroll/dist/vuescroll-native'
import MilkInput from './components/package/input/index'
import MilkArticleSimple from './components/package/article-simple/index'
import MilkArticle from './components/package/article/index'
import MilkTag from './components/package/tag/index'
import MilkDialog from './components/package/dialog/index'
import MilkComment from './components/package/comment/index'
import MilkLoading from './components/package/loading/index'

// 插件 S
Vue.use(vuescroll, {
  ops: {
    bar: {
      background: '#7f7f7f',
    },
      scrollPanel: {
          initialScrollY: false,
          initialScrollX: false,
          scrollingX: false,
          scrollingY: true,
          speed: 300,
          easing: undefined,
          verticalNativeBarPos: 'right',
          maxHeight:undefined,
          maxWidth:undefined,
      }
  }
})
// 插件 E

Vue.use(MilkInput)
Vue.use(MilkArticleSimple)
Vue.use(MilkArticle)
Vue.use(MilkTag)
Vue.use(MilkDialog)
Vue.use(MilkComment)
Vue.use(MilkLoading)

Vue.config.productionTip = false
// 通过script引入的组件
Vue.component('paginate', VuejsPaginate)
new Vue({
  router,
  store,
  render: h => h(App),
  created () {
    this.$store.dispatch('daisy/blog/InitCategory')
    this.$store.dispatch('daisy/blog/InitHotTag')
    this.$store.dispatch('daisy/blog/InitHotArticle')
  }
}).$mount('#app')
